<?php
include '../config/config.inc.php';
// load SOAP library
require_once("libs/nusoap.php");
require_once("libs/functions.php");
// load library that holds implementations of functions we're making available to the web service
// set namespace
$ns="http://".WS_NAME."/".FOLDER."/";
// create SOAP server object
$server = new soap_server();
// setup WSDL file, a WSDL file can contain multiple services
$server->configureWSDL('Checkflayer',$ns);
$server->wsdl->schemaTargetNamespace=$ns;
############ CONFIGURAZIONE CARTELLA CLIENTE ############################
$server->register('ws_getCartella',
	array('codice' => 'xsd:string'), 	
	array('result' => 'xsd:string'), 							
	$ns, 														
    "$ns#ws_getCartella",		                			
    'rpc',                              		
    'encoded',                          	
    'recupera la cartella relativa al cliente associato allo smartphone che fa la richiesta'            	
	);

function ws_getCartella($codice){
return new soapval('return','xsd:string',getCartella($codice));
}
## service the methods 
$server->service($HTTP_RAW_POST_DATA);
?>